package com.wjggy.core.common.dbtools;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

public interface TableMapper {
	@Select("select max_number from ta_auto_number t where table_name=#{tableName}")
	public Integer findTableKey(String tableName);
	
	@Insert("insert into ta_auto_number(table_name,max_number) values(#{tableName},1)")
	public Integer insertTableKey(String tableName);
	
	@Insert("update  ta_auto_number set max_number=max_number+1  where table_name=#{tableName}")
	public Integer updateTableKey(String tableName);
}
